/*
 * ActivityMessageListItem.java
 * business
 *
 * Created by chentao on 2017/4/26.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.displaylistitem;

import android.app.Activity;
import android.content.Context;
import android.view.View;

import com.yidiandao.business.ui.messageabout.activity.DiscoveryActivityMessageActivity;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.viewholder.ActivityMessageHolder;

/**
 * 发现页-活动通知
 * <p>
 * Created by ChenTao(chentao7v@gmail.com) on 2017/4/26 0026 9:18
 */
public class DiscoveryActivityMessageListItem extends DisplayListItem<ActivityMessageHolder, Integer> {

    public DiscoveryActivityMessageListItem(Integer integer) {
        super(integer);
    }

    @Override
    public void onShow(final Context context, ActivityMessageHolder holder) {
        holder.refreshUnReadCount(data);
        holder.rootLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DiscoveryActivityMessageActivity.actionStart((Activity) context);
            }
        });
    }

    @Override
    public String getDisplayItemTag() {
        return DiscoveryActivityMessageListItem.class.getSimpleName();
    }

    @Override
    public Class<ActivityMessageHolder> getViewHolderClazz() {
        return ActivityMessageHolder.class;
    }
}
